package com.karrysong.answerapplication.activities;


import android.view.View;
import android.widget.ImageView;

import com.karrysong.answerapplication.R;
import com.karrysong.answerapplication.utils.ScreenShotUtil;
import com.karrysong.answerapplication.utils.ToastUtils;

import butterknife.BindView;

public class OpenVipActivity extends BaseActivity {

    @BindView(R.id.pay_qrcode)
    ImageView payImage;

    @Override
    int getLayoutId() {
        return R.layout.activity_open_vip;
    }

    @Override
    void initListener() {
        super.initListener();

        payImage.setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View v) {
                byte[] bytes = ScreenShotUtil.screenshotView(payImage, OpenVipActivity.this);
                if (bytes.length > 0){
                    ToastUtils.showLong("已经保存到系统相册了！");
                }
                return false;
            }
        });
    }
}